import { IsInt, IsString, IsDate } from 'class-validator';
import { Type } from 'class-transformer';

export class CookieResponseDto {
  @IsInt()
  id: number;

  @IsString()
  name: string;
  @IsString()
  filename: string;
  @IsString()
  content: string; // Buffer converted to string (e.g., UTF-8 or base64)

  @IsInt()
  platformId: number;
  @IsString()
  platformName: string;
  @IsDate()
  @Type(() => Date) // Ensures Date is properly transformed
  createdAt: Date;
}
